/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "AmfNon3GppAccessRegistration.h"

namespace oai::udr::model {

AmfNon3GppAccessRegistration::AmfNon3GppAccessRegistration() {
  m_AmfInstanceId = "";
  m_SupportedFeatures = "";
  m_SupportedFeaturesIsSet = false;
  m_PurgeFlag = false;
  m_PurgeFlagIsSet = false;
  m_Pei = "";
  m_PeiIsSet = false;
  m_DeregCallbackUri = "";
  m_AmfServiceNameDeregIsSet = false;
  m_PcscfRestorationCallbackUri = "";
  m_PcscfRestorationCallbackUriIsSet = false;
  m_AmfServiceNamePcscfRestIsSet = false;
  m_BackupAmfInfoIsSet = false;
  m_UrrpIndicator = false;
  m_UrrpIndicatorIsSet = false;
  m_AmfEeSubscriptionId = "";
  m_AmfEeSubscriptionIdIsSet = false;
  m_RegistrationTime = "";
  m_RegistrationTimeIsSet = false;
  m_VgmlcAddressIsSet = false;
  m_ContextInfoIsSet = false;
}

AmfNon3GppAccessRegistration::~AmfNon3GppAccessRegistration() {}

void AmfNon3GppAccessRegistration::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const AmfNon3GppAccessRegistration &o) {
  j = nlohmann::json();
  j["amfInstanceId"] = o.m_AmfInstanceId;
  if (o.supportedFeaturesIsSet())
    j["supportedFeatures"] = o.m_SupportedFeatures;
  if (o.purgeFlagIsSet())
    j["purgeFlag"] = o.m_PurgeFlag;
  if (o.peiIsSet())
    j["pei"] = o.m_Pei;
  j["imsVoPs"] = o.m_ImsVoPs;
  j["deregCallbackUri"] = o.m_DeregCallbackUri;
  if (o.amfServiceNameDeregIsSet())
    j["amfServiceNameDereg"] = o.m_AmfServiceNameDereg;
  if (o.pcscfRestorationCallbackUriIsSet())
    j["pcscfRestorationCallbackUri"] = o.m_PcscfRestorationCallbackUri;
  if (o.amfServiceNamePcscfRestIsSet())
    j["amfServiceNamePcscfRest"] = o.m_AmfServiceNamePcscfRest;
  j["guami"] = o.m_Guami;
  if (o.backupAmfInfoIsSet() || !o.m_BackupAmfInfo.empty())
    j["backupAmfInfo"] = o.m_BackupAmfInfo;
  j["ratType"] = o.m_RatType;
  if (o.urrpIndicatorIsSet())
    j["urrpIndicator"] = o.m_UrrpIndicator;
  if (o.amfEeSubscriptionIdIsSet())
    j["amfEeSubscriptionId"] = o.m_AmfEeSubscriptionId;
  if (o.registrationTimeIsSet())
    j["registrationTime"] = o.m_RegistrationTime;
  if (o.vgmlcAddressIsSet())
    j["vgmlcAddress"] = o.m_VgmlcAddress;
  if (o.contextInfoIsSet())
    j["contextInfo"] = o.m_ContextInfo;
}

void from_json(const nlohmann::json &j, AmfNon3GppAccessRegistration &o) {
  j.at("amfInstanceId").get_to(o.m_AmfInstanceId);
  if (j.find("supportedFeatures") != j.end()) {
    j.at("supportedFeatures").get_to(o.m_SupportedFeatures);
    o.m_SupportedFeaturesIsSet = true;
  }
  if (j.find("purgeFlag") != j.end()) {
    j.at("purgeFlag").get_to(o.m_PurgeFlag);
    o.m_PurgeFlagIsSet = true;
  }
  if (j.find("pei") != j.end()) {
    j.at("pei").get_to(o.m_Pei);
    o.m_PeiIsSet = true;
  }
  j.at("imsVoPs").get_to(o.m_ImsVoPs);
  j.at("deregCallbackUri").get_to(o.m_DeregCallbackUri);
  if (j.find("amfServiceNameDereg") != j.end()) {
    j.at("amfServiceNameDereg").get_to(o.m_AmfServiceNameDereg);
    o.m_AmfServiceNameDeregIsSet = true;
  }
  if (j.find("pcscfRestorationCallbackUri") != j.end()) {
    j.at("pcscfRestorationCallbackUri").get_to(o.m_PcscfRestorationCallbackUri);
    o.m_PcscfRestorationCallbackUriIsSet = true;
  }
  if (j.find("amfServiceNamePcscfRest") != j.end()) {
    j.at("amfServiceNamePcscfRest").get_to(o.m_AmfServiceNamePcscfRest);
    o.m_AmfServiceNamePcscfRestIsSet = true;
  }
  j.at("guami").get_to(o.m_Guami);
  if (j.find("backupAmfInfo") != j.end()) {
    j.at("backupAmfInfo").get_to(o.m_BackupAmfInfo);
    o.m_BackupAmfInfoIsSet = true;
  }
  j.at("ratType").get_to(o.m_RatType);
  if (j.find("urrpIndicator") != j.end()) {
    j.at("urrpIndicator").get_to(o.m_UrrpIndicator);
    o.m_UrrpIndicatorIsSet = true;
  }
  if (j.find("amfEeSubscriptionId") != j.end()) {
    j.at("amfEeSubscriptionId").get_to(o.m_AmfEeSubscriptionId);
    o.m_AmfEeSubscriptionIdIsSet = true;
  }
  if (j.find("registrationTime") != j.end()) {
    j.at("registrationTime").get_to(o.m_RegistrationTime);
    o.m_RegistrationTimeIsSet = true;
  }
  if (j.find("vgmlcAddress") != j.end()) {
    j.at("vgmlcAddress").get_to(o.m_VgmlcAddress);
    o.m_VgmlcAddressIsSet = true;
  }
  if (j.find("contextInfo") != j.end()) {
    j.at("contextInfo").get_to(o.m_ContextInfo);
    o.m_ContextInfoIsSet = true;
  }
}

std::string AmfNon3GppAccessRegistration::getAmfInstanceId() const {
  return m_AmfInstanceId;
}
void AmfNon3GppAccessRegistration::setAmfInstanceId(std::string const &value) {
  m_AmfInstanceId = value;
}
std::string AmfNon3GppAccessRegistration::getSupportedFeatures() const {
  return m_SupportedFeatures;
}
void AmfNon3GppAccessRegistration::setSupportedFeatures(
    std::string const &value) {
  m_SupportedFeatures = value;
  m_SupportedFeaturesIsSet = true;
}
bool AmfNon3GppAccessRegistration::supportedFeaturesIsSet() const {
  return m_SupportedFeaturesIsSet;
}
void AmfNon3GppAccessRegistration::unsetSupportedFeatures() {
  m_SupportedFeaturesIsSet = false;
}
bool AmfNon3GppAccessRegistration::isPurgeFlag() const { return m_PurgeFlag; }
void AmfNon3GppAccessRegistration::setPurgeFlag(bool const value) {
  m_PurgeFlag = value;
  m_PurgeFlagIsSet = true;
}
bool AmfNon3GppAccessRegistration::purgeFlagIsSet() const {
  return m_PurgeFlagIsSet;
}
void AmfNon3GppAccessRegistration::unsetPurgeFlag() {
  m_PurgeFlagIsSet = false;
}
std::string AmfNon3GppAccessRegistration::getPei() const { return m_Pei; }
void AmfNon3GppAccessRegistration::setPei(std::string const &value) {
  m_Pei = value;
  m_PeiIsSet = true;
}
bool AmfNon3GppAccessRegistration::peiIsSet() const { return m_PeiIsSet; }
void AmfNon3GppAccessRegistration::unsetPei() { m_PeiIsSet = false; }
ImsVoPs AmfNon3GppAccessRegistration::getImsVoPs() const { return m_ImsVoPs; }
void AmfNon3GppAccessRegistration::setImsVoPs(ImsVoPs const &value) {
  m_ImsVoPs = value;
}
std::string AmfNon3GppAccessRegistration::getDeregCallbackUri() const {
  return m_DeregCallbackUri;
}
void AmfNon3GppAccessRegistration::setDeregCallbackUri(
    std::string const &value) {
  m_DeregCallbackUri = value;
}
ServiceName AmfNon3GppAccessRegistration::getAmfServiceNameDereg() const {
  return m_AmfServiceNameDereg;
}
void AmfNon3GppAccessRegistration::setAmfServiceNameDereg(
    ServiceName const &value) {
  m_AmfServiceNameDereg = value;
  m_AmfServiceNameDeregIsSet = true;
}
bool AmfNon3GppAccessRegistration::amfServiceNameDeregIsSet() const {
  return m_AmfServiceNameDeregIsSet;
}
void AmfNon3GppAccessRegistration::unsetAmfServiceNameDereg() {
  m_AmfServiceNameDeregIsSet = false;
}
std::string
AmfNon3GppAccessRegistration::getPcscfRestorationCallbackUri() const {
  return m_PcscfRestorationCallbackUri;
}
void AmfNon3GppAccessRegistration::setPcscfRestorationCallbackUri(
    std::string const &value) {
  m_PcscfRestorationCallbackUri = value;
  m_PcscfRestorationCallbackUriIsSet = true;
}
bool AmfNon3GppAccessRegistration::pcscfRestorationCallbackUriIsSet() const {
  return m_PcscfRestorationCallbackUriIsSet;
}
void AmfNon3GppAccessRegistration::unsetPcscfRestorationCallbackUri() {
  m_PcscfRestorationCallbackUriIsSet = false;
}
ServiceName AmfNon3GppAccessRegistration::getAmfServiceNamePcscfRest() const {
  return m_AmfServiceNamePcscfRest;
}
void AmfNon3GppAccessRegistration::setAmfServiceNamePcscfRest(
    ServiceName const &value) {
  m_AmfServiceNamePcscfRest = value;
  m_AmfServiceNamePcscfRestIsSet = true;
}
bool AmfNon3GppAccessRegistration::amfServiceNamePcscfRestIsSet() const {
  return m_AmfServiceNamePcscfRestIsSet;
}
void AmfNon3GppAccessRegistration::unsetAmfServiceNamePcscfRest() {
  m_AmfServiceNamePcscfRestIsSet = false;
}
Guami AmfNon3GppAccessRegistration::getGuami() const { return m_Guami; }
void AmfNon3GppAccessRegistration::setGuami(Guami const &value) {
  m_Guami = value;
}
std::vector<BackupAmfInfo> &AmfNon3GppAccessRegistration::getBackupAmfInfo() {
  return m_BackupAmfInfo;
}
void AmfNon3GppAccessRegistration::setBackupAmfInfo(
    std::vector<BackupAmfInfo> const &value) {
  m_BackupAmfInfo = value;
  m_BackupAmfInfoIsSet = true;
}
bool AmfNon3GppAccessRegistration::backupAmfInfoIsSet() const {
  return m_BackupAmfInfoIsSet;
}
void AmfNon3GppAccessRegistration::unsetBackupAmfInfo() {
  m_BackupAmfInfoIsSet = false;
}
RatType AmfNon3GppAccessRegistration::getRatType() const { return m_RatType; }
void AmfNon3GppAccessRegistration::setRatType(RatType const &value) {
  m_RatType = value;
}
bool AmfNon3GppAccessRegistration::isUrrpIndicator() const {
  return m_UrrpIndicator;
}
void AmfNon3GppAccessRegistration::setUrrpIndicator(bool const value) {
  m_UrrpIndicator = value;
  m_UrrpIndicatorIsSet = true;
}
bool AmfNon3GppAccessRegistration::urrpIndicatorIsSet() const {
  return m_UrrpIndicatorIsSet;
}
void AmfNon3GppAccessRegistration::unsetUrrpIndicator() {
  m_UrrpIndicatorIsSet = false;
}
std::string AmfNon3GppAccessRegistration::getAmfEeSubscriptionId() const {
  return m_AmfEeSubscriptionId;
}
void AmfNon3GppAccessRegistration::setAmfEeSubscriptionId(
    std::string const &value) {
  m_AmfEeSubscriptionId = value;
  m_AmfEeSubscriptionIdIsSet = true;
}
bool AmfNon3GppAccessRegistration::amfEeSubscriptionIdIsSet() const {
  return m_AmfEeSubscriptionIdIsSet;
}
void AmfNon3GppAccessRegistration::unsetAmfEeSubscriptionId() {
  m_AmfEeSubscriptionIdIsSet = false;
}
std::string AmfNon3GppAccessRegistration::getRegistrationTime() const {
  return m_RegistrationTime;
}
void AmfNon3GppAccessRegistration::setRegistrationTime(
    std::string const &value) {
  m_RegistrationTime = value;
  m_RegistrationTimeIsSet = true;
}
bool AmfNon3GppAccessRegistration::registrationTimeIsSet() const {
  return m_RegistrationTimeIsSet;
}
void AmfNon3GppAccessRegistration::unsetRegistrationTime() {
  m_RegistrationTimeIsSet = false;
}
VgmlcAddress AmfNon3GppAccessRegistration::getVgmlcAddress() const {
  return m_VgmlcAddress;
}
void AmfNon3GppAccessRegistration::setVgmlcAddress(VgmlcAddress const &value) {
  m_VgmlcAddress = value;
  m_VgmlcAddressIsSet = true;
}
bool AmfNon3GppAccessRegistration::vgmlcAddressIsSet() const {
  return m_VgmlcAddressIsSet;
}
void AmfNon3GppAccessRegistration::unsetVgmlcAddress() {
  m_VgmlcAddressIsSet = false;
}
ContextInfo AmfNon3GppAccessRegistration::getContextInfo() const {
  return m_ContextInfo;
}
void AmfNon3GppAccessRegistration::setContextInfo(ContextInfo const &value) {
  m_ContextInfo = value;
  m_ContextInfoIsSet = true;
}
bool AmfNon3GppAccessRegistration::contextInfoIsSet() const {
  return m_ContextInfoIsSet;
}
void AmfNon3GppAccessRegistration::unsetContextInfo() {
  m_ContextInfoIsSet = false;
}

} // namespace oai::udr::model
